<?php
namespace app\index\controller;

use app\common\library\Ems;
use GatewayWorker\Gateway;
use think\Controller;

class Index extends Controller
{
    public function index(){
        $this->redirect('/admin');
    }
    public function notify()
    {
        $data = [
            'type' => 'newOrder',
            // 订单详情
            'order' => '这里是订单详情',
        ];



        // 向所有客户端广播订单通知
        \GatewayWorker\Lib\Gateway::sendToAll(json_encode($data));
    }
}
